import java.util.Scanner;

public class Main1746 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        for (int i=1;i<=n;i++){
            int a=0;
            if (i%2==0){
                a++;
            }if (i%3==0){
                a++;
            }if (i%5==0){
                a++;
            }if (i%7==0){
                a++;
            }if (a>1){
                System.out.println(i);
            }
        }
    }
}
